﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.DB;

namespace YJKArch.ImportStructureProject.ImportObjects
{
	public class WallInfos : ObjectInfos
	{
		public XYZ StartPoint
		{
			get
			{
				return this.m_EdgeInfos.StartPoint;
			}
		}

		public XYZ EndPoint
		{
			get
			{
				return this.m_EdgeInfos.EndPoint;
			}
		}

		public double Bulge
		{
			get
			{
				return this.m_EdgeInfos.Bulge;
			}
		}

		public double Height
		{
			get
			{
				return this.m_Height;
			}
		}

		public double Thickness
		{
			get
			{
				return this.m_Thickness;
			}
		}

		public double BottomElevation
		{
			get
			{
				return this.StartPoint.Z;
			}
		}

		public bool IsArc
		{
			get
			{
				return this.m_EdgeInfos.IsArc;
			}
		}

		public List<WallHoleInfos> Holes
		{
			get
			{
				return this.m_Holes;
			}
		}

		public WallInfos(WallInfos rhs)
		{
			this.m_OldElementId = rhs.m_OldElementId;
			this.m_EdgeInfos = rhs.m_EdgeInfos;
			this.m_Height = rhs.m_Height;
			this.m_Thickness = rhs.m_Thickness;
			this.m_Holes = rhs.Holes;
		}

		public WallInfos(ElementId oldElementId, XYZ startPoint, XYZ endPoint, double bulge, double height, double thickness, List<WallHoleInfos> holes)
		{
			this.m_OldElementId = oldElementId;
			this.m_EdgeInfos = new EdgeInfos(startPoint, endPoint, bulge);
			this.m_Height = height;
			this.m_Thickness = thickness;
			this.m_Holes = holes;
		}

		private EdgeInfos m_EdgeInfos;

		private double m_Height;

		private double m_Thickness;

		private List<WallHoleInfos> m_Holes = new List<WallHoleInfos>();
	}
}
